<%-- 
    Document   : home
    Created on : Apr 11, 2013, 12:10:16 PM
    Author     : mona.chandrapal
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Issue Tracker</title>


<!--  JQuery  -->
<script type="text/javascript" src="jquery/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="jquery/jquery-ui-1.8.20.custom.min.js"></script>
<link type="text/css"
	href="jquery/smoothness/jquery-ui-1.10.1.custom.css" rel="stylesheet" />
<link type="text/css"
	href="jquery/smoothness/jquery-ui-1.10.1.custom.min.css"
	rel="stylesheet" />




<!-- Bootstrap  -->
<link href="twbootstrap/css/bootstrap.min.css" rel="stylesheet"
	media="screen">
<link href="twbootstrap/css/bootstrap-responsive.min.css"
	rel="stylesheet" media="screen">
<script src="twbootstrap/js/bootstrap.min.js"></script>
<script src="twbootstrap/js/bootstrap-dropdown.js"></script>



<!--  Chosen -->
<script type="text/javascript" src="wiki/chosen/chosen.jquery.js"></script>
<link rel="stylesheet" href="wiki/chosen/chosen.css" />

<script type="text/javascript" charset="utf-8">
	var loginstatus = "";

	$(document).ready(
			function() {
				$("#errormessage").hide();
				
				$("#btnLogin").live(
						'click',
						function() {
							$.ajax({
								type : "post",
								url : "VerifyLogin",
								datatype : "json",
								data : "username=" + $("#username").val()
										+ "&password=" + $("#password").val(),
								success : function(data) {
									if (data.loginstatus.length > 0) {
										var status =  data.loginstatus[0].status;
										//alert("Status=" + status);
										if(status == "success" ){
											window.location = "wiki/home.jsp?";
										}else{
											//window.location = "login.jsp?";
											$("#errormessage").show();
											
										}
										
												

									}

									return false;

								},
								error : function(jqXHR, textStatus) {
									alert("Request failed: " + textStatus);
								}
							});
						});
			});
</script>


<style>
* {
	margin: 0;
	padding: 0;
}

body {
	font-family: Arial;
	background: #fff url(images/bg.png) no-repeat top left;
}

.title {
	width: 548px;
	height: 119px;
	position: absolute;
	top: 400px;
	left: 200px;
	background: transparent url(images/title.png) no-repeat top left;
}

a.back {
	background: transparent url(images/back.png) no-repeat top left;
	position: fixed;
	width: 150px;
	height: 27px;
	outline: none;
	bottom: 10px;
	left: 10px;
}

#content {
	margin: 0 auto;
}
</style>
</head>
<body>
	<div class="navbar navbar-static-top">
		<div class="navbar-inner">
			<a class="brand" href="kblogin.jsp">IssueTracker</a>
		</div>
	</div>

	<div class="container"
		style="width: 300px; margin-left: 60%; margin-top: 30px">

		<h2 class="form-signin-heading" style="font-size: 18px;">Please
			sign in</h2>

		<input type="text" name="username" id="username"
			placeholder="username.." class="input-block-level"> <br /> <input
			type="password" placeholder="password.." class="input-block-level"
			name="password" id="password">

		<div class="control-group">
			<div class="controls">
				<select id="select01" style="width: 100%;" class="input-medium"
					disabled>
					<option>CORP</option>
				</select>
			</div>
		</div>
	
<!-- 
		<label class="checkbox"> <input type="checkbox"
			value="remember-me"> Remember me
		</label>  -->
		
		<div class="alert alert-error" id="errormessage" >
			Please verify Username & Password !
		</div>
		
		
		<button class="btn btn-medium btn-primary" id="btnLogin" value="Login">Sign
			in</button>
			
			<b><i><div style="margin-top: 20px; text-align: center">Works best in modern browsers : </div></i></b>
			<b><i><div style="text-align: center">IE10, Chrome, Opera</div></i></b>
	</div>


	<a class="back" href="#"></a>
	<div class="title"></div>

	
</body>
</html>
